      SUBROUTINE YLIST(JY,ISET,DDMNP,DDMXP)
      REAL*8  RAD,TMASS,GS,RHO0,GA
      REAL*8  D,H,RHO,ELAMB,EMU,GR,XI,PHI,ETA
      COMMON/MODEL /NLAY,ISO,LAME,NDIV,DMAX,ILAY,
     1              RAD,TMASS,GS,RHO0,GA,
     2              HI(500),RHOI(500),VPI(500),VSI(500),NAME(20),
     3              XII(500),PHII(500),ETAI(500),
     4              D(1000),H(1000),RHO(1000),ELAMB(1000),EMU(1000),
     5              GR(1000),XI(1000),PHI(1000),ETA(1000)
      REAL*8  RMAX,RC,HC,H1,H2,ALP,WN,WN2,C,C2,FRQ,FRQ2,T,U,ENGY,DELTA
      REAL*8  A,F,Y
      COMMON/VALUE /MODE,IERROR,I,ISTEP,J,K,L,N,NSOL,ISUM,KMAX,
     1              NMAX,IBOTM,ITOP,LY,LD,ACR,ELLIP,
     2              RMAX,RC,HC,H1,H2,ALP,WN,WN2,C,C2,FRQ,FRQ2,T,
     3              U,ENGY,DELTA,
     4              A(6,6),F(20),Y(6)
      REAL*8  YN,YB,SUM,Q
      COMMON/SOL   /YN(6,1000),YB(6,3,20),SUM(20),Q(3,21),
     1              WNB(100),TT(100),CC(100),UU(100),ENG(100),ELL(100),
     2              AC(100)
      REAL*8  W
      DIMENSION  YY(6)
C
C PRINT AND/OR PUNCH EIGENFUNCTIONS
C
C TITLE
C
      W=1.0
      SWN=WN
      ST=T
      SC=C
      SU=U
      SENG=ENGY
      SR=RAD
      SG=GS
      SM=TMASS
      SRH=RHO0
      IF(ISET.LE.7)  GO TO  1
      WRITE(ISET)  NAME
      WRITE(ISET)  NLAY,SR,SM,SG,SRH,ISO,LAME,NDIV,DMAX
      WRITE(ISET)  MODE,SWN,ST,SC,SU,SENG,NMAX,IBOTM,ITOP
    1 CONTINUE
C
C PRINT
C
  100 CONTINUE
      
c      WRITE(6,101)
  101 FORMAT(1H0,5X,4HK(N),11X,1HT,10X,1HC,11X,1HU,13X,4HK.E.,13X,
     1       5HY3/Y1,10X,5HERROR)
c      WRITE(6,102)  WN,T,C,U,ENGY,ELLIP,ACR
  102 FORMAT(1H ,D15.8,F12.5,2F12.7,D17.8,2E15.5)

      IF((ISET.LE.7).AND.(JY.EQ.0)) GO TO 1000
      IF(JY-2)  300,200,200
C
C PUNCH
C
  200 CONTINUE
C*    WRITE(7,201)  NAME
C*  201 FORMAT(20A4)
C*    WRITE(7,202)  NLAY,RAD,SM,GS,RHO0,ISO,LAME
        
c      WRITE(*,202)  NLAY,RAD,SM,GS,RHO0,ISO,LAME
      WRITE(8,202)  NLAY,RAD,SM,GS,RHO0,ISO,LAME
  202 FORMAT(I5,F10.5,E15.7,F10.5,F10.6,2I2)
C*    WRITE(7,203)  MODE,SWN,ST,SC,SU,SENG
      WRITE(8,203)  MODE,SWN,ST,SC,SU,SENG
  203 FORMAT(I5,5E15.7)
C*    WRITE(7,204)  NMAX,IBOTM,ITOP
      WRITE(8,204)  NMAX,IBOTM,ITOP
  204 FORMAT(3I5)
C
  300 CONTINUE
      IF(JY.EQ.0)  GO TO  320
      IF(JY-2)  310,320,310
  310 CONTINUE
c      WRITE(6,311)
  311 FORMAT(1H0,3X,5HDEPTH,10X,2HY1,15X,2HY2,15X,2HY3,15X,2HY4,15X,
     1       2HY5,15X,2HY6)
  320 CONTINUE
      N=0
      I=ITOP-1
C
C
  500 CONTINUE
      I=I+1
      GO TO  (510,520,510,520,510,560),MODE
C
C SET L VALUE
C
  510 CONTINUE
      L=2
      GO TO  600
  520 CONTINUE
      L=4
      IF(EMU(I).EQ.0.0)  L=2
      GO TO  600
  560 CONTINUE
      L=6
      IF(EMU(I).EQ.0.0)  L=4
      GO TO  600
C
  600 CONTINUE
      N=N+1
      IF(MODE.GE.3)  W=1.0/(RAD-D(I))
      DO  601  LL=1,L
      YY(LL)=W*YN(LL,N)
  601 CONTINUE
      DD=D(I)
      IF(ISET.GT.7)  WRITE(ISET)  L,DD,(YY(LL),LL=1,L)
      IF(DD.LT.DDMNP) GO TO 900
      IF(DD.GT.DDMXP) GO TO 1000
      IF(JY.EQ.0)  GO TO  900
      IF(JY-2)  700,800,700
C
C PRINT
C
  700 CONTINUE
c      WRITE(6,701)  DD,(YY(LL),LL=1,L)
  701 FORMAT(1H ,F10.5,6(3X,E14.7))
      IF(JY-2)  900,800,800
C
C PUNCH
C
  800 CONTINUE
      WRITE(7,801)  L,DD,(YY(LL),LL=1,L)
  801 FORMAT(I5,(5E15.7))
C
  900 CONTINUE
      IF(N.GE.NMAX)  GO TO  1000
      IF(H(I+1).EQ.0.0)  GO TO  500
      I=I+2
      GO TO  600
C
C EXIT
C
 1000 CONTINUE
      RETURN
      END
